class CreateFareModes < ActiveRecord::Migration[5.2]
  def change
    create_table :fare_modes do |t|
      t.integer :fare_template_id
      t.integer :first_n_piece, default: 1
      t.decimal :first_amount, :precision => 10, :scale => 2, :default => 0.0
      t.integer :second_n_piece, default: 1
      t.decimal :second_amount, :precision => 10, :scale => 2, :default => 0.0
      t.boolean :is_default, default: false

      t.timestamps
    end
  end
end
